package com.zzp.controller;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.zzp.api.ProviderClient;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/consumer")
@RequiredArgsConstructor
public class ConsumerController {

    private final ProviderClient providerClient;


    @DeleteMapping("/{id}")
    public String deleteStudent(@PathVariable("id") Integer id) {
        try {
            providerClient.deleteStudent(id);
        }catch (Exception e){
            return "fail";
        }
        return "success";
    }

}
